﻿/*********************************************************************
 *
 *                             NOTICE
 *               COPYRIGHT (c) 2012 Panoscopix Software, Inc.
 *                UNPUBLISHED - ALL RIGHTS RESERVED
 * 
 *      This program is confidential, proprietary, and a trade
 *   secret of Panoscopix Software, Inc. The receipt or possession of
 *     this program does not convey any rights to reproduce or
 *      disclose its contents, or to manufacture, use, or sell
 *       anything that it may describe, in whole or in part, 
 *   without the specific written consent of Panoscopix Software, Inc.
 *
 * Implements the Results of Commands, which is simply string output.
 * 
 *******************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FileSystem;

namespace FileSystem.Impl
{
    class Result : IResult
    {
        private bool isError;
	    private String result;
	
	    public Result(String result)
         : this(false, result)
        {
		    //Intentionally empty.
	    }

        public Result(bool isError, String result) {
            this.isError = isError;
            this.result = result;
        }

	    public bool isResultEmpty() {
            return String.IsNullOrEmpty(result);
	    }
	
        public bool isResultError() {
            return isError;
        }

	    public String getResult() {
		    if (isResultEmpty()) return "";
		    return result;
	    }
    }
}

